Dynomotion

Group: DynoMotion Message: 7571 From: dbt3000files Date: 6/2/2013
Subject: simulation mode printf
I don't have my kmotion cnc software hooked up to a machine yet. I am trying to test my setup using the example file mcodeparams.c shown below. Should I be able to see a result printed when I am in kmotion simulation mode? I believe I have everything set up correctly in the tool setup menu, but I get nothing when I run the example code M110 P1.23 Q4.56 R-1.

#include "KMotionDef.h"



main()

{

printf("P = %f Q = %f R = %f\n",

*(float *)&persist.UserData[0],

*(float *)&persist.UserData[1],

*(float *)&persist.UserData[2]);

}
Group: DynoMotion Message: 7572 From: Tom Kerekes Date: 6/2/2013
Subject: Re: simulation mode printf
In Simulation mode most M Codes are ignored/skipped.  The idea is that when simulating you wouldn't want to have your Spindle Switching on and such.

If you turn Simulation mode off that line of code should execute and print to the Console Screen.  Of course you will need a KFLOP connected as that code executes inside KFLOP.

If you configure things as an open loop system (ie InitKStep3Axis.c) then you can even run GCode without any CNC hardware (or a KSTEP).  KFLOP will be generating Step Pulses and so forth but will be unaware that nothing is actually moving.

HTH
Regards
TK